package org.openwork.portlet.skillmanagement.service;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.util.ClassLoaderProxy;


/**
 * <a href="SkillLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class provides static methods for the
 * {@link SkillLocalService} bean. The static methods of
 * this class calls the same methods of the bean instance. It's convenient to be
 * able to just write one line to call a method on a bean instead of writing a
 * lookup call and a method call.
 * </p>
 *
 * @author    Samuel Garcia Martinez
 * @see       SkillLocalService
 * @generated
 */
public class SkillLocalServiceUtil {
    private static SkillLocalService _service;

    public static org.openwork.portlet.skillmanagement.model.Skill addSkill(
        org.openwork.portlet.skillmanagement.model.Skill skill)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService().addSkill(skill);
    }

    public static org.openwork.portlet.skillmanagement.model.Skill createSkill(
        long id) {
        return getService().createSkill(id);
    }

    public static void deleteSkill(long id)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        getService().deleteSkill(id);
    }

    public static void deleteSkill(
        org.openwork.portlet.skillmanagement.model.Skill skill)
        throws com.liferay.portal.kernel.exception.SystemException {
        getService().deleteSkill(skill);
    }

    @SuppressWarnings("unchecked")
    public static java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService().dynamicQuery(dynamicQuery);
    }

    @SuppressWarnings("unchecked")
    public static java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
        int end) throws com.liferay.portal.kernel.exception.SystemException {
        return getService().dynamicQuery(dynamicQuery, start, end);
    }

    @SuppressWarnings("unchecked")
    public static java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
        int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService()
                   .dynamicQuery(dynamicQuery, start, end, orderByComparator);
    }

    public static long dynamicQueryCount(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService().dynamicQueryCount(dynamicQuery);
    }

    public static org.openwork.portlet.skillmanagement.model.Skill getSkill(
        long id)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().getSkill(id);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.Skill> getSkills(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService().getSkills(start, end);
    }

    public static int getSkillsCount()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService().getSkillsCount();
    }

    public static org.openwork.portlet.skillmanagement.model.Skill updateSkill(
        org.openwork.portlet.skillmanagement.model.Skill skill)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService().updateSkill(skill);
    }

    public static org.openwork.portlet.skillmanagement.model.Skill updateSkill(
        org.openwork.portlet.skillmanagement.model.Skill skill, boolean merge)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getService().updateSkill(skill, merge);
    }

    public static org.openwork.portlet.skillmanagement.model.Skill updateSkill(
        long pk, java.lang.String name, long userId, long categoryId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().updateSkill(pk, name, userId, categoryId);
    }

    public static org.openwork.portlet.skillmanagement.model.Skill addSkill(
        java.lang.String name, long userId, long categoryId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().addSkill(name, userId, categoryId);
    }

    public static int countByCategoryId(long categoryId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().countByCategoryId(categoryId);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.Skill> searchByCategoryId(
        long categoryId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService()
                   .searchByCategoryId(categoryId, start, end, orderByComparator);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.Skill> searchByCategoryId(
        long categoryId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        return getService().searchByCategoryId(categoryId);
    }

    public static void clearService() {
        _service = null;
    }

    public static SkillLocalService getService() {
        if (_service == null) {
            Object obj = PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
                    SkillLocalService.class.getName());
            ClassLoader portletClassLoader = (ClassLoader) PortletBeanLocatorUtil.locate(ClpSerializer.SERVLET_CONTEXT_NAME,
                    "portletClassLoader");

            ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(obj,
                    SkillLocalService.class.getName(), portletClassLoader);

            _service = new SkillLocalServiceClp(classLoaderProxy);

            ClpSerializer.setClassLoader(portletClassLoader);
        }

        return _service;
    }

    public void setService(SkillLocalService service) {
        _service = service;
    }
}
